package models

import "time"

var MfbusUploadLogDirection map[int]string

// 校车打卡日志
type MfbusUploadLog struct {
	Id            int64     `orm:"description(自增主键)"`
	Device        *Device   `orm:"rel(fk);null;default(0);description(设备Id)"`
	School        *School   `orm:"rel(fk);null;default(0);description(学校Id)"`
	Student       *Student  `orm:"rel(fk);null;default(0);description(学生Id)"`
	DeviceSn      string    `orm:"description(系统内部设备唯一标识)"`
	SchoolSn      string    `orm:"description(系统内部学校唯一标识)"`
	CardNum       string    `orm:"description(卡号)"`
	Direction     int       `orm:"description(1上车 2下车)"`
	DirectionShow string    `orm:"-"`
	Temp          float64   `orm:"digits(10);decimals(1);description(学生体温)"`
	CreatedDate   time.Time `orm:"auto_now_add;type(date);description(创建日期)"`
	Created       time.Time `orm:"auto_now_add;type(datetime);description(创建时间)"`
	CreatedShow   string    `orm:"-"`
}

func init() {
	MfbusUploadLogDirection = map[int]string{
		0: "未知",
		1: "上车",
		2: "下车",
	}
}
